package cn.cihon.ubi.qorosauto.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class RushHour {

	private Date sRushTime1 = null;
	private Date eRushTime1 = null;
	private Date sRushTime2 = null;
	private Date eRushTime2 = null;
	
	public RushHour(Date recordTimestamp) {
		
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		String dateStr = format.format(recordTimestamp);
		
		String sRushTime1Str = dateStr + " " + "8:00:00";
		sRushTime1 = DateUtil.StrToDate(sRushTime1Str);
		
		String eRushTime1Str = dateStr + " " + "10:00:00";
		eRushTime1 = DateUtil.StrToDate(eRushTime1Str);
		
		String sRushTime2Str = dateStr + " " + "20:00:00";
		sRushTime2 = DateUtil.StrToDate(sRushTime2Str);
		
		String eRushTime2Str = dateStr + " " + "22:00:00";
		eRushTime2 = DateUtil.StrToDate(eRushTime2Str);
		
	}

	public Date getsRushTime1() {
		return sRushTime1;
	}

	public Date geteRushTime1() {
		return eRushTime1;
	}

	public Date getsRushTime2() {
		return sRushTime2;
	}

	public Date geteRushTime2() {
		return eRushTime2;
	}
	
}
